---
title: Core
description: Ultracite's base configuration with framework-agnostic linting rules.
---

The core Ultracite configuration provides a comprehensive set of framework-agnostic linting rules and formatting settings. This is the foundation that all other framework-specific configurations extend.

## Installation

The core configuration is automatically included when you run:

```bash
npx ultracite init
```

Or add it manually to your `biome.jsonc`:

```jsonc title="biome.jsonc"
{
  "extends": ["ultracite/core"]
}
```

## Overview

The core configuration includes hundreds of strict linting rules covering:

- **Accessibility (a11y)**: Enforce ARIA attributes, semantic HTML, and keyboard navigation
- **Complexity**: Reduce cognitive complexity and enforce best practices
- **Correctness**: Prevent common errors and enforce type safety
- **Performance**: Optimize code for better runtime performance
- **Security**: Prevent security vulnerabilities
- **Style**: Enforce consistent code style
- **Suspicious**: Catch suspicious patterns that might indicate bugs

## Formatter Settings

- **Indentation**: 2 spaces
- **Line Width**: 80 characters
- **Line Ending**: LF (Unix-style)
- **Semicolons**: Always required
- **Quotes**: Double quotes for JavaScript/TypeScript and JSON
- **Trailing Commas**: ES5 style (multi-line arrays/objects)
- **Arrow Parentheses**: Always include parentheses

## Key Features

### TypeScript Strictness

The core configuration enables TypeScript's strict checks:

- Discourages use of `any` (`noExplicitAny: error`)
- Requires handling of `null/undefined`
- Prefers explicit types in certain situations
- Enforces type safety across the codebase

### ESLint Recommended Equivalents

Common best-practice rules are included:

- No unused variables (`noUnusedVariables: error`)
- No unused imports (`noUnusedImports: error`)
- No explicit eval (`noGlobalEval: error`)
- No prototype pollution (`noPrototypeBuiltins: error`)

### Accessibility by Default

Rules equivalent to accessibility standards:

- ARIA attributes must be valid
- Semantic HTML elements preferred
- Keyboard navigation support required
- Alt text for images required

### Node.js Support

Environment-specific handling:

- Recognizes Node.js globals (`module`, `process`)
- Enforces `node:` protocol for built-in modules
- Supports both CommonJS and ESM

## Complete Rule Reference

### Accessibility (a11y)

| Rule | Setting | Description |
|------|---------|-------------|
| `noAccessKey` | `error` | Enforce that the `accessKey` attribute is not used on any HTML element. |
| `noAriaHiddenOnFocusable` | `error` | Enforce that `aria-hidden="true"` is not set on focusable elements. |
| `noAriaUnsupportedElements` | `error` | Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. |
| `noAutofocus` | `off` | Enforce that `autoFocus` prop is not used on elements. |
| `noDistractingElements` | `error` | Enforces that no distracting elements are used. |
| `noHeaderScope` | `error` | The scope prop should be used only on `<th>` elements. |
| `noInteractiveElementToNoninteractiveRole` | `error` | Enforce that non-interactive ARIA roles are not assigned to interactive HTML elements. |
| `noLabelWithoutControl` | `error` | Enforce that a label element or component has a text label and an associated input. |
| `noNoninteractiveElementInteractions` | `error` | Disallow use event handlers on non-interactive elements. |
| `noNoninteractiveElementToInteractiveRole` | `error` | Enforce that interactive ARIA roles are not assigned to non-interactive HTML elements. |
| `noNoninteractiveTabindex` | `error` | Enforce that `tabIndex` is not assigned to non-interactive HTML elements. |
| `noPositiveTabindex` | `error` | Prevent the usage of positive integers on `tabIndex` property. |
| `noRedundantAlt` | `error` | Enforce img alt prop does not contain the word `image`, `picture`, or `photo`. |
| `noRedundantRoles` | `error` | Enforce explicit role property is not the same as implicit/default role property on an element. |
| `noStaticElementInteractions` | `error` | Enforce that static, visible elements (such as `<div>`) that have click handlers use the valid role attribute. |
| `noSvgWithoutTitle` | `error` | Enforces the usage of the title element for the `svg` element. |
| `useAltText` | `error` | Enforce that all elements that require alternative text have meaningful information to relay back to the end user. |
| `useAnchorContent` | `error` | Enforce that anchors have content and that the content is accessible to screen readers. |
| `useAriaActivedescendantWithTabindex` | `error` | Enforce that `tabIndex` is assigned to non-interactive HTML elements with aria-activedescendant. |
| `useAriaPropsForRole` | `error` | Enforce that elements with ARIA roles must have all required ARIA attributes for that role. |
| `useAriaPropsSupportedByRole` | `error` | Enforce that ARIA properties are valid for the roles that are supported by the element. |
| `useButtonType` | `error` | Enforces the usage of the attribute `type` for the element button. |
| `useFocusableInteractive` | `error` | Elements with an interactive role and interaction handlers must be focusable. |
| `useHeadingContent` | `error` | Enforce that heading elements (`h1`, `h2`, etc.) have content and that the content is accessible to screen readers. |
| `useHtmlLang` | `error` | Enforce that `html` element has `lang` attribute. |
| `useIframeTitle` | `error` | Enforces the usage of the attribute title for the element iframe. |
| `useKeyWithClickEvents` | `error` | Enforce `onClick` is accompanied by at least one of the following: `onKeyUp`, `onKeyDown`, `onKeyPress`. |
| `useKeyWithMouseEvents` | `error` | Enforce `onMouseOver` / `onMouseOut` are accompanied by `onFocus` / `onBlur`. |
| `useMediaCaption` | `error` | Enforces that audio and video elements must have a track for captions. |
| `useSemanticElements` | `error` | It detects the use of role attributes in JSX elements and suggests using semantic elements instead. |
| `useValidAnchor` | `error` | Enforce that all anchors are valid, and they are navigable elements. |
| `useValidAriaProps` | `error` | Ensures that ARIA properties `aria-*` are all valid. |
| `useValidAriaRole` | `error` | Elements with ARIA roles must use a valid, non-abstract ARIA role. |
| `useValidAriaValues` | `error` | Enforce that ARIA state and property values are valid. |
| `useValidAutocomplete` | `error` | Use valid values for the autocomplete attribute on input elements. |
| `useValidLang` | `error` | Ensure that the attribute passed to the `lang` attribute is a correct ISO language and/or country. |
| `useGenericFontNames` | `error` | Disallow a missing generic family keyword within font families (CSS). |

### Complexity

| Rule | Setting | Description |
|------|---------|-------------|
| `noAdjacentSpacesInRegex` | `error` | Disallow unclear usage of consecutive space characters in regular expression literals. |
| `noArguments` | `error` | Disallow the use of arguments. |
| `noBannedTypes` | `error` | Disallow primitive type aliases and misleading types. |
| `noCommaOperator` | `error` | Disallow comma operator. |
| `noEmptyTypeParameters` | `error` | Disallow empty type parameters in type aliases and interfaces. |
| `noExcessiveCognitiveComplexity` | `error` | Disallow functions that exceed a given Cognitive Complexity score. |
| `noExcessiveLinesPerFunction` | `off` | Restrict the number of lines of code in a function. |
| `noExcessiveNestedTestSuites` | `error` | This rule enforces a maximum depth to nested `describe()` in test files. |
| `noExtraBooleanCast` | `error` | Disallow unnecessary boolean casts. |
| `noFlatMapIdentity` | `error` | Disallow to use unnecessary callback on flatMap. |
| `noForEach` | `error` | Prefer `for...of` statement instead of `Array.forEach`. |
| `noImplicitCoercions` | `off` | Disallow shorthand type conversions. |
| `noImportantStyles` | `off` | Disallow the use of the `!important` style (CSS). |
| `noStaticOnlyClass` | `error` | This rule reports when a class has no non-static members. |
| `noThisInStatic` | `error` | Disallow `this` and `super` in static contexts. |
| `noUselessCatch` | `error` | Disallow unnecessary catch clauses. |
| `noUselessConstructor` | `error` | Disallow unnecessary constructors. |
| `noUselessContinue` | `error` | Avoid using unnecessary continue. |
| `noUselessEmptyExport` | `error` | Disallow empty exports that don't change anything in a module file. |
| `noUselessEscapeInRegex` | `error` | Disallow unnecessary escape sequence in regular expression literals. |
| `noUselessFragments` | `error` | Disallow unnecessary fragments. |
| `noUselessLabel` | `error` | Disallow unnecessary labels. |
| `noUselessLoneBlockStatements` | `error` | Disallow unnecessary nested block statements. |
| `noUselessRename` | `error` | Disallow renaming import, export, and destructured assignments to the same name. |
| `noUselessStringConcat` | `error` | Disallow unnecessary concatenation of string or template literals. |
| `noUselessStringRaw` | `error` | Disallow unnecessary `String.raw` function in template string literals without any escape sequence. |
| `noUselessSwitchCase` | `error` | Disallow useless case in switch statements. |
| `noUselessTernary` | `error` | Disallow ternary operators when simpler alternatives exist. |
| `noUselessThisAlias` | `error` | Disallow useless `this` aliasing. |
| `noUselessTypeConstraint` | `error` | Disallow using `any` or `unknown` as type constraint. |
| `noUselessUndefinedInitialization` | `error` | Disallow initializing variables to `undefined`. |
| `noVoid` | `error` | Disallow the use of `void` operators, which is not a familiar operator. |
| `useArrowFunction` | `error` | Use arrow functions over function expressions. |
| `useDateNow` | `error` | Use `Date.now()` to get the number of milliseconds since the Unix Epoch. |
| `useFlatMap` | `error` | Promotes the use of `.flatMap()` when `map().flat()` are used together. |
| `useIndexOf` | `error` | Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. |
| `useLiteralKeys` | `error` | Enforce the usage of a literal access to properties over computed property access. |
| `useNumericLiterals` | `error` | Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals. |
| `useOptionalChain` | `error` | Enforce using concise optional chain instead of chained logical expressions. |
| `useRegexLiterals` | `error` | Enforce the use of the regular expression literals instead of the `RegExp` constructor if possible. |
| `useSimpleNumberKeys` | `error` | Disallow number literal object member names which are not base 10 or use underscore as separator. |
| `useSimplifiedLogicExpression` | `error` | Discard redundant terms from logical expressions. |
| `useWhile` | `error` | Enforce the use of while loops instead of for loops when the initializer and update expressions are not needed. |

### Correctness

| Rule | Setting | Description |
|------|---------|-------------|
| `noConstAssign` | `error` | Prevents from having const variables being re-assigned. |
| `noConstantCondition` | `error` | Disallow constant expressions in conditions. |
| `noConstantMathMinMaxClamp` | `error` | Disallow the use of `Math.min` and `Math.max` to clamp a value where the result itself is constant. |
| `noConstructorReturn` | `error` | Disallow returning a value from a constructor. |
| `noEmptyCharacterClassInRegex` | `error` | Disallow empty character classes in regular expression literals. |
| `noEmptyPattern` | `error` | Disallows empty destructuring patterns. |
| `noGlobalDirnameFilename` | `error` | Disallow the use of `__dirname` and `__filename` in the global scope. |
| `noGlobalObjectCalls` | `error` | Disallow calling global object properties as functions. |
| `noInnerDeclarations` | `error` | Disallow function and `var` declarations that are accessible outside their block. |
| `noInvalidBuiltinInstantiation` | `error` | Ensure that builtins are correctly instantiated. |
| `noInvalidConstructorSuper` | `error` | Prevents the incorrect use of `super()` inside classes. |
| `noInvalidDirectionInLinearGradient` | `error` | Disallow non-standard direction values for linear gradient functions (CSS). |
| `noInvalidGridAreas` | `error` | Disallows invalid named grid areas in CSS Grid Layouts (CSS). |
| `noInvalidPositionAtImportRule` | `error` | Disallow the use of `@import` at-rules in invalid positions (CSS). |
| `noInvalidUseBeforeDeclaration` | `error` | Disallow the use of variables and function parameters before their declaration. |
| `noMissingVarFunction` | `error` | Disallow missing `var` function for css variables (CSS). |
| `noNodejsModules` | `off` | Forbid the use of Node.js builtin modules. |
| `noNonoctalDecimalEscape` | `error` | Disallow `\8` and `\9` escape sequences in string literals. |
| `noPrecisionLoss` | `error` | Disallow literal numbers that lose precision. |
| `noPrivateImports` | `off` | Restrict imports of private exports. |
| `noProcessGlobal` | `off` | Disallow the use of `process` global. |
| `noRestrictedElements` | `error` | Disallow the use of configured elements. |
| `noSelfAssign` | `error` | Disallow assignments where both sides are exactly the same. |
| `noSetterReturn` | `error` | Disallow returning a value from a setter. |
| `noStringCaseMismatch` | `error` | Disallow comparison of expressions modifying the string case with non-compliant value. |
| `noSwitchDeclarations` | `error` | Disallow lexical declarations in switch clauses. |
| `noUndeclaredDependencies` | `off` | Disallow the use of dependencies that aren't specified in the `package.json`. |
| `noUndeclaredVariables` | `error` | Prevents the usage of variables that haven't been declared inside the document. |
| `noUnknownFunction` | `error` | Disallow unknown CSS value functions (CSS). |
| `noUnknownMediaFeatureName` | `error` | Disallow unknown media feature names (CSS). |
| `noUnknownProperty` | `error` | Disallow unknown properties (CSS). |
| `noUnknownPseudoClass` | `error` | Disallow unknown pseudo-class selectors (CSS). |
| `noUnknownPseudoElement` | `error` | Disallow unknown pseudo-element selectors (CSS). |
| `noUnknownTypeSelector` | `error` | Disallow unknown type selectors (CSS). |
| `noUnknownUnit` | `error` | Disallow unknown CSS units (CSS). |
| `noUnmatchableAnbSelector` | `error` | Disallow unmatchable An+B selectors (CSS). |
| `noUnreachable` | `error` | Disallow unreachable code. |
| `noUnreachableSuper` | `error` | Ensures the `super()` constructor is called exactly once on every code path in a class constructor before this is accessed. |
| `noUnsafeFinally` | `error` | Disallow control flow statements in finally blocks. |
| `noUnsafeOptionalChaining` | `error` | Disallow the use of optional chaining in contexts where the undefined value is not allowed. |
| `noUnusedFunctionParameters` | `error` | Disallow unused function parameters. |
| `noUnusedImports` | `error` (safe fix override) | Disallow unused imports. |
| `noUnusedLabels` | `error` | Disallow unused labels. |
| `noUnusedPrivateClassMembers` | `error` | Disallow unused private class members. |
| `noUnusedVariables` | `error` | Disallow unused variables. |
| `noVoidTypeReturn` | `error` | Disallow returning a value from a function with the return type `void`. |
| `useGraphqlNamedOperations` | `error` | Enforce specifying the name of GraphQL operations. |
| `useImageSize` | `error` | Enforces that `<img>` elements have both width and height attributes. |
| `useImportExtensions` | `off` | Enforce file extensions for relative imports. |
| `useIsNan` | `error` | Require calls to `isNaN()` when checking for NaN. |
| `useJsonImportAttributes` | `off` | Enforces the use of with `{ type: "json" }` for JSON module imports. |
| `useParseIntRadix` | `error` | Enforce the consistent use of the radix argument when using `parseInt()`. |
| `useSingleJsDocAsterisk` | `error` | Enforce JSDoc comment lines to start with a single asterisk, except for the first one. |
| `useUniqueElementIds` | `off` | Prevent the usage of static string literal id attribute on elements. |
| `useValidForDirection` | `error` | Enforce `for` loop update clause moving the counter in the right direction. |
| `useValidTypeof` | `error` | This rule checks that the result of a `typeof` expression is compared to a valid value. |
| `useYield` | `error` | Require generator functions to contain `yield`. |

### Nursery

| Rule | Setting | Description |
|------|---------|-------------|
| `noContinue` | `off` | Disallow continue statements. |
| `noDeprecatedImports` | `off` | Restrict imports of deprecated exports. |
| `noDuplicateDependencies` | `error` | Prevent the listing of duplicate dependencies. |
| `noDuplicatedSpreadProps` | `error` | Disallow duplicate properties in spread props. |
| `noEmptySource` | `error` | Disallow empty source files. |
| `noEqualsToNull` | `error` | Disallow using `==` or `!=` to compare with `null`. Use `===` or `!==` instead. |
| `noFloatingPromises` | `off` | Require Promise-like statements to be handled appropriately. |
| `noForIn` | `off` | Disallow iterating using a for-in loop. |
| `noImportCycles` | `off` | Prevent import cycles. |
| `noIncrementDecrement` | `error` | Disallow the use of `++` and `--` operators (except in for loop afterthoughts). |
| `noJsxLiterals` | `off` | Disallow string literals inside JSX elements. |
| `noLeakedRender` | `error` | Prevent problematic leaked values in JSX (e.g., 0 or NaN) from being rendered. |
| `noMisusedPromises` | `off` | Disallow Promises to be used in places where they are almost certainly a mistake. |
| `noMultiStr` | `error` | Disallow multi-line strings using backslash continuation. |
| `noParametersOnlyUsedInRecursion` | `error` | Disallow parameters that are only used in recursive calls. |
| `noProto` | `error` | Disallow the use of the `__proto__` property. |
| `noShadow` | `error` | Disallow variable declarations from shadowing variables declared in the outer scope. |
| `noSyncScripts` | `error` | Prevent the usage of synchronous scripts. |
| `noTernary` | `off` | Disallow ternary operators. |
| `noUnnecessaryConditions` | `off` | Disallow unnecessary type-based conditions that can be statically determined as redundant. |
| `noUnresolvedImports` | `off` | Warn when importing non-existing exports. |
| `noUnusedExpressions` | `error` | Disallow expression statements that are neither a function call nor an assignment. |
| `noUselessCatchBinding` | `off` | Disallow unused `catch` bindings. |
| `noUselessUndefined` | `error` | Disallow the use of useless `undefined`. |
| `useArraySortCompare` | `off` | Enforce the use of a compare function in `Array.prototype.sort()`. |
| `useConsistentArrowReturn` | `error` | Enforce consistent arrow function bodies. |
| `useConsistentGraphqlDescriptions` | `error` | Require all descriptions to follow the same style (either block or inline) inside GraphQL files. |
| `useDeprecatedDate` | `error` | Require the `@deprecated` directive to specify a deletion date. |
| `useExhaustiveSwitchCases` | `off` | Require switch-case statements to be exhaustive. |
| `useExplicitType` | `off` | Enforce types in functions, methods, variables, and parameters. |
| `useFind` | `error` | Enforce the use of `Array.prototype.find()` over `Array.prototype.filter()` followed by `[0]` when looking for a single result. |
| `useMaxParams` | `error` | Enforce a maximum number of parameters in function definitions. |
| `useSortedClasses` | `error` (safe fix override) | Enforce the sorting of CSS utility classes. |
| `useSpread` | `error` | Enforce the use of the spread operator over `Function.prototype.apply()`. |
| `useUniqueGraphqlOperationName` | `error` | Ensure that all GraphQL operations within a document have unique names. |

### Performance

| Rule | Setting | Description |
|------|---------|-------------|
| `noAccumulatingSpread` | `error` | Disallow the use of spread (`...`) syntax on accumulators. |
| `noAwaitInLoops` | `off` | Disallow `await` inside loops. |
| `noBarrelFile` | `error` | Disallow the use of barrel file. |
| `noDelete` | `error` | Disallow the use of the `delete` operator. |
| `noDynamicNamespaceImportAccess` | `error` | Disallow accessing namespace imports dynamically. |
| `noNamespaceImport` | `error` | Disallow the use of namespace imports. |
| `noReExportAll` | `off` | Avoid re-export all. |
| `noUnwantedPolyfillio` | `error` | Prevent duplicate polyfills from Polyfill.io. |
| `useGoogleFontPreconnect` | `error` | Ensure the `preconnect` attribute is used when using Google Fonts. |
| `useTopLevelRegex` | `error` | Require regex literals to be declared at the top level. |

### Security

| Rule | Setting | Description |
|------|---------|-------------|
| `noBlankTarget` | `error` | Disallow `target="_blank"` attribute without `rel="noopener"`. |
| `noDangerouslySetInnerHtml` | `error` | Prevent the usage of dangerous JSX props. |
| `noDangerouslySetInnerHtmlWithChildren` | `error` | Report when a DOM element or a component uses both children and `dangerouslySetInnerHTML` prop. |
| `noGlobalEval` | `error` | Disallow the use of global `eval()`. |

### Style

| Rule | Setting | Description |
|------|---------|-------------|
| `noCommonJs` | `off` | Disallow use of Common JS module system in favor of ESM style imports. |
| `noDefaultExport` | `off` | Disallow default exports. |
| `noDoneCallback` | `error` | Disallow using a callback in asynchronous tests and hooks. |
| `noEnum` | `error` | Disallow TypeScript enum. |
| `noExportedImports` | `error` | Disallow exporting an imported variable. |
| `noImplicitBoolean` | `off` | Disallow implicit true values on JSX boolean attributes. |
| `noInferrableTypes` | `error` | Disallow type annotations for variables, parameters, and class properties initialized with a literal expression. |
| `noMagicNumbers` | `off` | Reports usage of "magic numbers" — numbers used directly instead of being assigned to named constants. |
| `noNamespace` | `error` | Disallow the use of TypeScript's namespaces. |
| `noNegationElse` | `error` | Disallow negation in the condition of an if statement if it has an else clause. |
| `noNestedTernary` | `error` | Disallow nested ternary expressions. |
| `noNonNullAssertion` | `error` | Disallow non-null assertions using the `!` postfix operator. |
| `noParameterAssign` | `error` | Disallow reassigning function parameters. |
| `noParameterProperties` | `error` | Disallow the use of parameter properties in class constructors. |
| `noProcessEnv` | `off` | Disallow the use of `process.env`. |
| `noRestrictedGlobals` | `error` | This rule allows you to specify global variable names that you don't want to use in your application. |
| `noRestrictedImports` | `error` | Disallow specified modules when loaded by import or require. |
| `noRestrictedTypes` | `error` | Disallow user defined types. |
| `noShoutyConstants` | `error` | Disallow the use of constants which its value is the upper-case version of its name. |
| `noSubstr` | `error` | Enforce the use of `String.slice()` over `String.substr()` and `String.substring()`. |
| `noUnusedTemplateLiteral` | `error` | Disallow template literals if interpolation and special-character handling are not needed. |
| `noUselessElse` | `error` | Disallow else block when the if block breaks early. |
| `noYodaExpression` | `error` | Disallow the use of yoda expressions. |
| `useArrayLiterals` | `error` | Disallow `Array` constructors. |
| `useAsConstAssertion` | `error` | Enforce the use of as const over literal type and type annotation. |
| `useAtIndex` | `error` | Use `at()` instead of integer index access. |
| `useBlockStatements` | `error` | Requires following curly brace conventions. |
| `useCollapsedElseIf` | `error` | Enforce using `else if` instead of nested `if` in `else` clauses. |
| `useCollapsedIf` | `error` | Enforce using single `if` instead of nested `if` clauses. |
| `useComponentExportOnlyModules` | `off` | Enforce declaring components only within modules that export React Components exclusively. |
| `useConsistentArrayType` | `error` | Require consistently using either `T[]` or `Array<T>`. |
| `useConsistentBuiltinInstantiation` | `error` | Enforce the use of new for all builtins, except `String`, `Number` and `Boolean`. |
| `useConsistentCurlyBraces` | `off` | This rule enforces consistent use of curly braces inside JSX attributes and JSX children. |
| `useConsistentMemberAccessibility` | `error` | Require consistent accessibility modifiers on class properties and methods. |
| `useConsistentObjectDefinitions` | `error` | Require the consistent declaration of object literals. |
| `useConst` | `error` | Require const declarations for variables that are only assigned once. |
| `useDefaultParameterLast` | `error` | Enforce default function parameters and optional function parameters to be last. |
| `useDefaultSwitchClause` | `error` | Require the `default` clause in switch statements. |
| `useDeprecatedReason` | `error` | Require specifying the reason argument when using `@deprecated` directive. |
| `useEnumInitializers` | `error` | Require that each enum member value be explicitly initialized. |
| `useExplicitLengthCheck` | `off` | Enforce explicitly comparing the `length`, `size`, `byteLength` or `byteOffset` property of a value. |
| `useExponentiationOperator` | `error` | Disallow the use of `Math.pow` in favor of the `**` operator. |
| `useExportType` | `error` | Promotes the use of export type for types. |
| `useExportsLast` | `off` | Require that all exports are declared after all non-export statements. |
| `useFilenamingConvention` | `error` | Enforce naming conventions for JavaScript and TypeScript filenames (kebab-case, ASCII). |
| `useForOf` | `error` | This rule recommends a for-of loop when in a for loop, the index used to extract an item from the iterated array. |
| `useFragmentSyntax` | `error` | This rule enforces the use of `<>...</>` over `<Fragment>...</Fragment>`. |
| `useGraphqlNamingConvention` | `error` | Validates that all enum values are capitalized. |
| `useGroupedAccessorPairs` | `error` | Enforce that getters and setters for the same property are adjacent in class and object definitions. |
| `useImportType` | `error` | Promotes the use of `import type` for types. |
| `useLiteralEnumMembers` | `error` | Require all enum members to be literal values. |
| `useNamingConvention` | `off` | Naming convention rule (disabled). |
| `useNodeAssertStrict` | `error` | Promotes the usage of `node:assert/strict` over `node:assert`. |
| `useNodejsImportProtocol` | `error` | Enforces using the `node:` protocol for Node.js builtin modules. |
| `useNumberNamespace` | `error` | Use the `Number` properties instead of global ones. |
| `useNumericSeparators` | `error` | Enforce the use of numeric separators in numeric literals. |
| `useObjectSpread` | `error` | Prefer object spread over `Object.assign()` when constructing new objects. |
| `useReadonlyClassProperties` | `error` | Enforce marking members as readonly if they are never modified outside the constructor. |
| `useSelfClosingElements` | `error` | Prevent extra closing tags for components without children. |
| `useShorthandAssign` | `error` | Require assignment operator shorthand where possible. |
| `useShorthandFunctionType` | `error` | Enforce using function types instead of object type with call signatures. |
| `useSingleVarDeclarator` | `off` | Disallow multiple variable declarations in the same variable statement. |
| `useSymbolDescription` | `error` | Require a description parameter for the `Symbol()`. |
| `useTemplate` | `error` | Prefer template literals over string concatenation. |
| `useThrowNewError` | `error` | Require new when throwing an error. |
| `useThrowOnlyError` | `error` | Disallow throwing non-`Error` values. |
| `useTrimStartEnd` | `error` | Enforce the use of `String.trimStart()` and `String.trimEnd()` over `String.trimLeft()` and `String.trimRight()`. |
| `useUnifiedTypeSignatures` | `error` | Disallow overload signatures that can be unified into a single signature. |
| `noDescendingSpecificity` | `error` | Disallow a lower specificity selector from coming after a higher specificity selector (CSS). |
| `noValueAtRule` | `error` | Disallow use of `@value` rule in css modules (CSS). |

### Suspicious

| Rule | Setting | Description |
|------|---------|-------------|
| `noAlert` | `error` | Disallow the use of `alert`, `confirm`, and `prompt`. |
| `noApproximativeNumericConstant` | `error` | Use standard constants instead of approximated literals. |
| `noAssignInExpressions` | `error` | Disallow assignments in expressions. |
| `noAsyncPromiseExecutor` | `error` | Disallows using an async function as a Promise executor. |
| `noBiomeFirstException` | `error` | Prevents the use of the `!` pattern in the first position of `files.includes` in the configuration file. |
| `noBitwiseOperators` | `error` | Disallow bitwise operators. |
| `noCatchAssign` | `error` | Disallow reassigning exceptions in catch clauses. |
| `noClassAssign` | `error` | Disallow reassigning class members. |
| `noCommentText` | `error` | Prevent comments from being inserted as text nodes. |
| `noCompareNegZero` | `error` | Disallow comparing against `-0`. |
| `noConfusingLabels` | `error` | Disallow labeled statements that are not loops. |
| `noConfusingVoidType` | `error` | Disallow void type outside of generic or return types. |
| `noConsole` | `off` | Disallow the use of `console`. |
| `noConstEnum` | `error` | Disallow TypeScript const enum. |
| `noConstantBinaryExpressions` | `error` | Disallow expressions where the operation doesn't affect the value. |
| `noControlCharactersInRegex` | `error` | Prevents from having control characters and some escape sequences that match control characters in regular expression literals. |
| `noDebugger` | `error` | Disallow the use of debugger. |
| `noDocumentCookie` | `error` | Disallow direct assignments to document.cookie. |
| `noDoubleEquals` | `error` | Require the use of `===` and `!==`. |
| `noDuplicateAtImportRules` | `error` | Disallow duplicate `@import` rules (CSS). |
| `noDuplicateCase` | `error` | Disallow duplicate case labels. |
| `noDuplicateClassMembers` | `error` | Disallow duplicate class members. |
| `noDuplicateCustomProperties` | `error` | Disallow duplicate custom properties within declaration blocks (CSS). |
| `noDuplicateElseIf` | `error` | Disallow duplicate conditions in if-else-if chains. |
| `noDuplicateFields` | `error` | Disallow duplicated fields in GraphQL operations. |
| `noDuplicateFontNames` | `error` | Disallow duplicate names within font families (CSS). |
| `noDuplicateObjectKeys` | `error` | Disallow two keys with the same name inside objects. |
| `noDuplicateParameters` | `error` | Disallow duplicate function parameter name. |
| `noDuplicateProperties` | `error` | Disallow duplicate properties within declaration blocks (CSS). |
| `noDuplicateSelectorsKeyframeBlock` | `error` | Disallow duplicate selectors within keyframe blocks (CSS). |
| `noDuplicateTestHooks` | `error` | A describe block should not contain duplicate hooks. |
| `noEmptyBlock` | `error` | Disallow CSS empty blocks (CSS). |
| `noEmptyBlockStatements` | `error` | Disallow empty block statements and static blocks. |
| `noEmptyInterface` | `error` | Disallow the declaration of empty interfaces. |
| `noEvolvingTypes` | `error` | Disallow variables from evolving into any type through reassignments. |
| `noExplicitAny` | `error` | Disallow the any type usage. |
| `noExportsInTest` | `error` | Disallow using export or module.exports in files containing tests. |
| `noExtraNonNullAssertion` | `error` | Prevents the wrong usage of the non-null assertion operator `!` in TypeScript files. |
| `noFallthroughSwitchClause` | `error` | Disallow fallthrough of switch clauses. |
| `noFocusedTests` | `error` | Disallow focused tests. |
| `noFunctionAssign` | `error` | Disallow reassigning function declarations. |
| `noGlobalAssign` | `error` | Disallow assignments to native objects and read-only global variables. |
| `noGlobalIsFinite` | `error` | Use `Number.isFinite` instead of global `isFinite`. |
| `noGlobalIsNan` | `error` | Use `Number.isNaN` instead of global `isNaN`. |
| `noImplicitAnyLet` | `error` | Disallow use of implicit any type on variable declarations. |
| `noImportAssign` | `error` | Disallow assigning to imported bindings. |
| `noImportantInKeyframe` | `error` | Disallow invalid `!important` within keyframe declarations (CSS). |
| `noIrregularWhitespace` | `error` | Disallows the use of irregular whitespace characters. |
| `noLabelVar` | `error` | Disallow labels that share a name with a variable. |
| `noMisleadingCharacterClass` | `error` | Disallow characters made with multiple code points in character class syntax. |
| `noMisleadingInstantiator` | `error` | Enforce proper usage of `new` and `constructor`. |
| `noMisplacedAssertion` | `error` | Checks that the assertion function, for example expect, is placed inside an `it()` function call. |
| `noMisrefactoredShorthandAssign` | `error` | Disallow shorthand assign when variable appears on both sides. |
| `noOctalEscape` | `error` | Disallow octal escape sequences in string literals. |
| `noPrototypeBuiltins` | `error` | Disallow direct use of `Object.prototype` builtins. |
| `noQuickfixBiome` | `error` | Disallow the use if `quickfix.biome` inside editor settings file. |
| `noRedeclare` | `error` | Disallow variable, function, class, and type redeclarations in the same scope. |
| `noRedundantUseStrict` | `error` | Prevents from having redundant `use strict`. |
| `noSelfCompare` | `error` | Disallow comparisons where both sides are exactly the same. |
| `noShadowRestrictedNames` | `error` | Disallow identifiers from shadowing restricted names. |
| `noShorthandPropertyOverrides` | `error` | Disallow shorthand properties that override related longhand properties (CSS). |
| `noSkippedTests` | `error` | Disallow disabled tests. |
| `noSparseArray` | `error` | Prevents the use of sparse arrays (arrays with holes). |
| `noTemplateCurlyInString` | `error` | Disallow template literal placeholder syntax in regular strings. |
| `noThenProperty` | `error` | Disallow then property. |
| `noTsIgnore` | `error` | Prevents the use of the TypeScript directive `@ts-ignore`. |
| `noUnassignedVariables` | `error` | Disallow let or var variables that are read but never assigned. |
| `noUnknownAtRules` | `error` | Disallow unknown at-rules (CSS). |
| `noUnsafeDeclarationMerging` | `error` | Disallow unsafe declaration merging between interfaces and classes. |
| `noUnsafeNegation` | `error` | Disallow using unsafe negation (`!`). |
| `noUselessEscapeInString` | `error` | Disallow unnecessary escapes in string literals. |
| `noUselessRegexBackrefs` | `error` | Disallow useless backreferences in regular expression literals that always match an empty string. |
| `noVar` | `error` | Disallow the use of `var`. |
| `noWith` | `error` | Disallow `with` statements in non-strict contexts. |
| `useAdjacentOverloadSignatures` | `error` | Disallow the use of overload signatures that are not next to each other. |
| `useAwait` | `error` | Ensure async functions utilize `await`. |
| `useBiomeIgnoreFolder` | `error` | Promotes the correct usage for ignoring folders in the configuration file. |
| `useDefaultSwitchClauseLast` | `error` | Enforce default clauses in switch statements to be last. |
| `useErrorMessage` | `error` | Enforce passing a message value when creating a built-in error. |
| `useGetterReturn` | `error` | Enforce get methods to always return a value. |
| `useGoogleFontDisplay` | `error` | Enforces the use of a recommended display strategy with Google Fonts. |
| `useGuardForIn` | `error` | Require for-in loops to include an `if` statement. |
| `useIsArray` | `error` | Use `Array.isArray()` instead of `instanceof Array`. |
| `useIterableCallbackReturn` | `error` | Enforce consistent return values in iterable callbacks. |
| `useNamespaceKeyword` | `error` | Require using the namespace keyword over the `module` keyword to declare TypeScript namespaces. |
| `useNumberToFixedDigitsArgument` | `error` | Enforce using the digits argument with `Number#toFixed()`. |
| `useStaticResponseMethods` | `error` | Use static `Response` methods instead of `new Response()` constructor when possible. |
| `useStrictMode` | `error` | Enforce the use of the directive `use strict` in script files. |

## Notes

Certain rules are disabled because they are too slow to run with the Scanner. As noted in the [Biome docs](https://biomejs.dev/guides/investigate-slowness/#first-things-first), project rules enabled are known to cause performance overhead in return for more advanced analysis.

In our testing, we have found these rules can make the difference between a 300ms and a 13s lint.